package com.ljx.recruitment.sale.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;

@Getter
@AllArgsConstructor
public enum AccessTokenTypeEnum {

    TRIAL_APPLICATION(1, "trial_application");

    private Integer key;

    private String value;

    public static Map<Integer, AccessTokenTypeEnum> cache;

    static {
        cache = Arrays.stream(AccessTokenTypeEnum.values()).collect(Collectors.toMap(AccessTokenTypeEnum::getKey, Function.identity()));
    }
}
